import axios from './axios.base';

export default {
  async addFootPrint(id: number){
    const res=await axios.post('/api/footprint',{
      goods_id: id
    });
    return res.data;
  },

  async delFootPrint(id: number){
    const res=await axios.delete(`/api/footprint/${id}`);
    return res.data;
  },

  async getFootPrint(params: any={}){
    const target={
      limit:10,
      page:1,
      sort:'add_time,DESC'
    }
    Object.assign(target,params);
    const res=await axios.get('/api/footprint',{
      params:target
    });
    return res.data;
  },
}